package Visitor;

public class Saler extends AbstractVisitor{
    @Override
    public void visit(Apple apple) {
        System.out.println("收银员" + name + "按斤给苹果称重，计算其价格并收费");

    }

    @Override
    public void visit(Book book) {
        System.out.println("收银员" + name + "按本给书计算价格，并收费");

    }
}
